package com.library.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审核类型
 *
 * @author: xyh
 * @create: 2023-10-05
 **/
@Getter
@AllArgsConstructor
public enum ClassifyEnum {

    NOTICE(0, "通知公告"),
    SYSTEM_NOTICE(1, "系统消息"),
    RETURN_BOOK(2, "归还图书");

    private Integer code;
    private String desc;


    public static String getValue(Integer code) {
        ClassifyEnum[] classifyEnums = values();
        for (ClassifyEnum classifyEnum : classifyEnums) {
            if (classifyEnum.getCode().equals(code)) {
                return classifyEnum.getDesc();
            }
        }
        return null;
    }

}
